//
//  AccountViewController.m
//  SDHuiYuShoping
//
//  Created by luojiao on 2017/4/23.
//  Copyright © 2017年 luojiao. All rights reserved.
//

#import "AccountViewController.h"
#import "PersonalInfoVC.h"
#import "AccountInfoViewController.h"

@interface AccountViewController ()

@end

@implementation AccountViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.hidden = YES;
    [self setBugttonBg];
}

- (void)setBugttonBg
{
    //设置返回按钮
    [self.backButton setImage:[UIImage imageNamed:@"back_white_btn"] forState:UIControlStateNormal];
    [self.backButton setImageEdgeInsets:UIEdgeInsetsMake(0, -50, 0, 0)];
    [self.backButton setTitle:@"返回" forState:UIControlStateNormal];
    [self.backButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -40, 0, 0)];
    
    [self.personalInfoButton setImage:[UIImage imageNamed:@"unfold_btn"] forState:UIControlStateNormal];
    [self.personalInfoButton setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0, -(APP_WIDTH - 40))];
    [self.personalImage setImage:[UIImage imageNamed:@"personal_logo"]];
    
    [self.accountButton setImage:[UIImage imageNamed:@"unfold_btn"] forState:UIControlStateNormal];
    [self.accountButton setImageEdgeInsets:UIEdgeInsetsMake(0, 0, 0, -(APP_WIDTH - 40))];
    [self.accountImage setImage:[UIImage imageNamed:@"account_security_logo"]];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = YES;
}

#pragma mark - buttonClick

- (IBAction)personalButtonClick:(id)sender
{
    PersonalInfoVC *personalInfoVC = [[PersonalInfoVC alloc] init];
    [self.navigationController pushViewController:personalInfoVC animated:YES];
}
- (IBAction)accountButtonClick:(id)sender
{
    AccountInfoViewController *accountInfoVC = [[AccountInfoViewController alloc] init];
    [self.navigationController pushViewController:accountInfoVC animated:YES];
}

- (IBAction)backButtonClick:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
